import 'package:wch/generated/json/base/json_field.dart';
import 'package:wch/generated/json/hospital.g.dart';
import 'dart:convert';

@JsonSerializable()
class HospitalModel {
	String? code;
	String? msg;
	List<HospitalData>? data;

	HospitalModel();

	factory HospitalModel.fromJson(Map<String, dynamic> json) => $HospitalModelFromJson(json);

	Map<String, dynamic> toJson() => $HospitalModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class HospitalData {
	String? id;
	String? hospitalName;
	String? sex;

	HospitalData();

	factory HospitalData.fromJson(Map<String, dynamic> json) => $HospitalDataFromJson(json);

	Map<String, dynamic> toJson() => $HospitalDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}